﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class RegisterForm : Form
    {
        public RegisterForm()
        {
            InitializeComponent();
        }


        private void label1_Click(object sender, EventArgs e)
        {

        }

        public static Dictionary<string, string> _user = new Dictionary<string, string>();

        private void RegisterForm_Load(object sender, EventArgs e)
        {
        }

        private void  RegisterForm_Click(object sender, EventArgs e)
        {

        }

        private void btnRegister_Click(object sender, EventArgs e)
        {

            var uid = userName.Text;
            var pwd = passWord.Text;
            var rpwd = reTryPassword.Text;

            if (!string.IsNullOrEmpty(uid) &&! string.IsNullOrEmpty(pwd) && pwd == rpwd)
            {
                MessageBox.Show("注册成功", "完成", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                宋宋._user.Add(uid, pwd);
                this.Close();
            }
            else
            {
                MessageBox.Show("注册未成功", "很抱歉", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
            }
        }



        private void btnCancelRegister_Click(object sender, EventArgs e)
        {

        }
    }
}
